package com.th.apicenter.deduct;

/**
 * @author kay
 * @date 2025/6/9
 * @TODO
 */
public enum TypeEnum {
    OPPO("oppo"),
    MI("小米"),
    VIVO("vivo"),
    XL("新浪");

    private final String chineseName;

    TypeEnum(String chineseName) {
        this.chineseName = chineseName;
    }

    public String getChineseName() {
        return chineseName;
    }

    public static String fromName(String name) {
        for (TypeEnum brand : values()) {
            if (brand.name().equalsIgnoreCase(name)) {
                return brand.chineseName;
            }
        }
        throw new IllegalArgumentException("没有找到对应的品牌: " + name);
    }
}